Optimal. Leaf size=61 \[ -\frac {a^3 c (-B+i A) (1+i \tan (e+f x))^3}{3 f}-\frac {a^3 B c (1+i \tan (e+f x))^4}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ -\frac {a^3 c (-B+i A) (1+i \tan (e+f x))^3}{3 f}-\frac {a^3 B c (1+i \tan (e+f x))^4}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3588
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (a+i a x)^2 (A+B x) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left ((A+i B) (a+i a x)^2-\frac {i B (a+i a x)^3}{a}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a^3 (i A-B) c (1+i \tan (e+f x))^3}{3 f}-\frac {a^3 B c (1+i \tan (e+f x))^4}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.98, size = 161, normalized size = 2.64 \[ \frac {a^3 c \sec (e) \sec ^4(e+f x) (3 (B+i A) \cos (e+2 f x)+3 (B+2 i A) \cos (e)+5 A \sin (e+2 f x)-3 A \sin (3 e+2 f x)+2 A \sin (3 e+4 f x)+3 i A \cos (3 e+2 f x)-6 A \sin (e)-i B \sin (e+2 f x)+3 i B \sin (3 e+2 f x)-i B \sin (3 e+4 f x)+3 B \cos (3 e+2 f x)+3 i B \sin (e))}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.66, size = 129, normalized size = 2.11 \[ \frac {{\left (24 i \, A + 24 \, B\right )} a^{3} c e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (48 i \, A + 24 \, B\right )} a^{3} c e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (32 i \, A + 16 \, B\right )} a^{3} c e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (8 i \, A + 4 \, B\right )} a^{3} c}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.70, size = 174, normalized size = 2.85 \[ \frac {24 i \, A a^{3} c e^{\left (6 i \, f x + 6 i \, e\right )} + 24 \, B a^{3} c e^{\left (6 i \, f x + 6 i \, e\right )} + 48 i \, A a^{3} c e^{\left (4 i \, f x + 4 i \, e\right )} + 24 \, B a^{3} c e^{\left (4 i \, f x + 4 i \, e\right )} + 32 i \, A a^{3} c e^{\left (2 i \, f x + 2 i \, e\right )} + 16 \, B a^{3} c e^{\left (2 i \, f x + 2 i \, e\right )} + 8 i \, A a^{3} c + 4 \, B a^{3} c}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 75, normalized size = 1.23 \[ \frac {a^{3} c \left (\frac {2 i B \left (\tan ^{3}\left (f x +e \right )\right )}{3}-\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{4}+i A \left (\tan ^{2}\left (f x +e \right )\right )-\frac {A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 73, normalized size = 1.20 \[ -\frac {3 \, B a^{3} c \tan \left (f x + e\right )^{4} + 4 \, {\left (A - 2 i \, B\right )} a^{3} c \tan \left (f x + e\right )^{3} + {\left (-12 i \, A - 6 \, B\right )} a^{3} c \tan \left (f x + e\right )^{2} - 12 \, A a^{3} c \tan \left (f x + e\right )}{12 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.48, size = 72, normalized size = 1.18 \[ \frac {-\frac {B\,c\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4}-\frac {c\,\left (A-B\,2{}\mathrm {i}\right )\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3}+\frac {c\,\left (B+A\,2{}\mathrm {i}\right )\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2}+A\,c\,a^3\,\mathrm {tan}\left (e+f\,x\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.64, size = 224, normalized size = 3.67 \[ \frac {- 8 i A a^{3} c - 4 B a^{3} c + \left (- 32 i A a^{3} c e^{2 i e} - 16 B a^{3} c e^{2 i e}\right ) e^{2 i f x} + \left (- 48 i A a^{3} c e^{4 i e} - 24 B a^{3} c e^{4 i e}\right ) e^{4 i f x} + \left (- 24 i A a^{3} c e^{6 i e} - 24 B a^{3} c e^{6 i e}\right ) e^{6 i f x}}{- 3 f e^{8 i e} e^{8 i f x} - 12 f e^{6 i e} e^{6 i f x} - 18 f e^{4 i e} e^{4 i f x} - 12 f e^{2 i e} e^{2 i f x} - 3 f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________